package com.example.thirdhomework

import android.content.Intent
import android.widget.EditText
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import android.widget.Button
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat


class ThirdActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_third)

        val confirm: Button = findViewById(R.id.confirm)
        val editText:EditText = findViewById(R.id.editText)

        confirm.setOnClickListener{
            val intent = Intent()
            intent.putExtra(SECOND_MSG,editText.text.toString())
            setResult(1,intent)
            finish()
        }
    }
}